﻿@{
    ViewBag.Title = "ASP.Net MVC 4 Strongly Typed HTML Helper Sample";
    
    @model List<MVC4CodeSamples.Areas.HTMLHelpers.Models.Employee> 
}
<h2>@ViewBag.Title</h2>
<table>
    <tr>
        <td>
            Helper Name
        </td>
        <td>
            Helper Code
        </td>
        <td>
            Output
        </td>
    </tr>
    <tr>
        <td>
            TextBoxFor
        </td>
        <td>
            @@Html.TextBoxFor(x => x.First().EmpSalary)
        </td>
        <td>
            @Html.TextBoxFor(x => x.First().EmpSalary)
        </td>
    </tr>
    <tr>
        <td>
            TextArea
        </td>
        <td>
            @@Html.TextArea(x => x.First().EmpName)
        </td>
        <td>
            @Html.TextAreaFor(x => x.First().EmpName)
        </td>
    </tr>
    <tr>
        <td>
            PasswordFor
        </td>
        <td>
            @@Html.PasswordFor(x => x.First().EmpName)
        </td>
        <td>
            @Html.PasswordFor(x => x.First().EmpName)
        </td>
    </tr>
    <tr>
        <td>
            HiddenFor
        </td>
        <td>
            @@Html.HiddenFor(x => x.First().EmpName)
        </td>
        <td>
            @Html.HiddenFor(x => x.First().EmpName)
        </td>
    </tr>
    <tr>
        <td>
            CheckBoxFor
        </td>
        <td>
            @@Html.CheckBoxFor(x => x.First().IsFullTime)
        </td>
        <td>
            @Html.CheckBoxFor(x => x.First().IsFullTime)
        </td>
    </tr>
    <tr>
        <td>
            Radio Button for
        </td>
        <td>
            @@Html.RadioButtonFor(x => x.First().EmpID>2)
        </td>
        <td>
            @Html.RadioButtonFor(x => x.First().IsFullTime, "Val1")
            @Html.RadioButtonFor(x => x.First().IsFullTime, "Val1")
            @Html.RadioButtonFor(x => x.First().IsFullTime, "Val1")
        </td>
    </tr>
    <tr>
        <td>
            Drop-down list
        </td>
        <td>
            @@Html.DropDownListFor(x => x.First().EmpName, new SelectList(Model.Select(p=>p.EmpName)))
        </td>
        <td>
           EmpName: @Html.DropDownListFor(x => x.First().EmpName, new SelectList(Model.Select(p=>p.EmpName)))
         
        </td>
    </tr>
    <tr>
        <td>
            ListBoxFor
        </td>
        <td>
            @@Html.ListBoxFor(x => x.First().EmpID>2)
        </td>
        <td>
           Select Employee:<br />
            @Html.ListBoxFor(x => x.First().EmpName, new SelectList(Model.Select(p => p.EmpName)))
         
        </td>
    </tr>
</table>
